using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;

using Fan.Dongping.Common;
using Fan.Dongping.Common.DBMeta;
using Fan.Dongping.DataBase;

namespace Fan.Dongping.DataAccess
{
    /// <summary>
    /// 
    /// </summary>
    public class LogDA
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="type"></param>
        /// <param name="body"></param>
        /// <returns></returns>
        public static int AddLog(string type, string body)
        {
            string sql = "INSERT INTO Log (LogType,LogBody,LogTime) VALUES (@LogType,@LogBody,GetDate()) ";
            SqlParameter[] paras = new SqlParameter[2];
            paras[0] = new SqlParameter("@LogType", type);
            paras[1] = new SqlParameter("@LogBody", body);

            return DA_Base.ExecuteNonQuery(sql, paras);
        }
    }
}
